let app = getApp();
Component({
    /**
     * 组件的属性列表
     */
    properties: {
        musicList: Array
    },

    pageLifetimes: {
        show() {
            this.setData({
                checkedId: app.getMusicId()
            })
        }
    },

    /**
     * 组件的初始数据
     */
    data: {
        checkedId: -1
    },

    /**
     * 组件的方法列表
     */
    methods: {
        onChecked(e) {
            const id = e.currentTarget.dataset.id;
            const index = e.currentTarget.dataset.index;
            this.setData({
                checkedId: id
            })
            wx.navigateTo({
                url: '/pages/player/player?id=' + this.data.checkedId + "&index=" + index,
            })
        }
    }
})